package net.adetech.crj.dao;

import net.adetech.crj.entity.Hall;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

@Mapper
public interface HallMapper {

    @Select("select * from crj_hall")
    List<Hall> getAllHallList();

    @Select("select * from crj_hall where SERVICE_TYPE_A1 = '1'")
    List<Hall> getHallListType1();


    @Select("select * from crj_hall where SERVICE_TYPE_B1 = '1'")
    List<Hall> getHallListType2();


    @Select("select * from crj_hall where SERVICE_TYPE_C1 = '1'")
    List<Hall> getHallListType3();


    @Select("select * from crj_hall where hall_id = #{hallId}")
    Hall getHallById(int hallId);


    @Update("update crj_hall set queue_count_a = #{countA},queue_count_b = #{countB},queue_count_c = #{countC} where id = 1")
    void updateQueueCount(@Param("countA") int countA, @Param("countB") int countB, @Param("countC") int countC);
}
